﻿<Pages:AudioBasePage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                     xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                     xmlns:Pages="clr-namespace:Samples.Radio.Pages"
                     x:Class="Samples.Radio.Pages.Settings.Settings"
                     Style="{StaticResource TransitionPageStyle}"
                     mc:Ignorable="d"
                     d:DesignHeight="768"
                     d:DesignWidth="480"
                     DataContext="{Binding Settings, Source={StaticResource Locator}}">
    <Grid x:Name="LayoutRoot"
          Background="Transparent"
          d:DataContext="{d:DesignData /SampleData/SettingsPageSampleData/SettingsPageSampleData.xaml}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel"
                    Grid.Row="0"
                    Margin="12,17,0,28">

            <StackPanel Orientation="Vertical">
                <TextBlock 
				DataContext="{StaticResource StationName}"
					Text="{Binding ConverterParameter=upper, Converter={StaticResource CaseConverter}}"
                           Foreground="{StaticResource PhoneForegroundBrush}" />
                <TextBlock Text="{Binding Slogan, ConverterParameter=lower, Converter={StaticResource CaseConverter}}"
                           Opacity="0.66"
                           Foreground="{StaticResource PhoneForegroundBrush}" />
            </StackPanel>
            <TextBlock x:Name="lblPageTitle"
                       Text="settings"
                       Margin="9,-7,0,0"
                       Style="{StaticResource PhoneTextTitle1Style}"
                       Foreground="{StaticResource BrandColour1Brush}" />
        </StackPanel>

        <StackPanel x:Name="ContentPanel"
                    Grid.Row="1"
                    Margin="12,0,12,0">
            <TextBlock x:Name="lblStreamHeader"
                       Text="current radio stream"
                       Style="{StaticResource PhoneTextNormalStyle}"
                       Visibility="Collapsed" />
            <TextBlock x:Name="lblStreamHelp"
                       Text="tap to select different stream"
                       Visibility="Collapsed"
                       Style="{StaticResource PhoneTextSubtleStyle}" />
            <toolkit:ListPicker ItemsSource="{Binding AudioStreams}"
                                ItemTemplate="{StaticResource SettingsStreamItemTemplate}"
                                SelectedItem="{Binding CurrentStream}"
                                FullModeItemTemplate="{StaticResource SettingsStreamItemTemplate}"
                                SelectionChanged="StreamSelectionChanged"
                                Header="current radio stream"
                                ExpansionMode="FullScreenOnly" />
            <!--
			<Button BorderBrush="{x:Null}"
				BorderThickness="0"
				HorizontalAlignment="Left">
				<i:Interaction.Triggers>
					<i:EventTrigger EventName="Click">
						<ec:NavigateToPageAction TargetPage="/Views/StreamSelector.xaml" />
					</i:EventTrigger>
				</i:Interaction.Triggers>
				<Grid DataContext="{Binding CurrentStream}">
					<StackPanel d:LayoutOverrides="Width, Height"
						Margin="100,-7,0,0"
						VerticalAlignment="Top">
						<TextBlock Text="{Binding TrackName}"
							TextWrapping="Wrap"
							Style="{StaticResource PhoneTextNormalStyle}"
							FontSize="{StaticResource PhoneFontSizeMedium}" />
						<TextBlock Text="{Binding Artist, ConverterParameter=upper, Converter={StaticResource CaseConverter}}"
							Opacity="0.75"
							Style="{StaticResource PhoneTextNormalStyle}"
							FontSize="{StaticResource PhoneFontSizeMedium}" />
					</StackPanel>
					<Image Source="{Binding AlbumArtUri}"
						HorizontalAlignment="Left"
						Width="100"
						Margin="0"
						VerticalAlignment="Top" />
				</Grid>
			</Button>-->
            <!--<TextBlock x:Name="lblLiveTileHeader" Text="live tile" Foreground="{StaticResource PhoneForegroundBrush}" d:IsHidden="True"/>
            <TextBlock x:Name="lblLiveTileHelp" Text="tap tile below to pin a live tile for this stream" Opacity="0.66" Foreground="{StaticResource PhoneForegroundBrush}" d:IsHidden="True"/>

            <local:NowPlayingTile DataContext="{Binding CurrentTrack}" HorizontalAlignment="Left" d:IsHidden="True">
            	<i:Interaction.Triggers>
            		<i:EventTrigger EventName="MouseLeftButtonDown">
                        <ec:CallMethodAction MethodName="UpdateLiveTile" TargetObject="{Binding Path=DataContext, ElementName=LayoutRoot}"/>
            		</i:EventTrigger>
            	</i:Interaction.Triggers>
            </local:NowPlayingTile>-->

        </StackPanel>
    </Grid>

</Pages:AudioBasePage>
